package com.dyj.applet.client;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.dyj.applet.domain.query.Code2SessionQuery;
import com.dyj.applet.domain.query.GetPhoneNumberQuery;
import com.dyj.applet.domain.vo.Code2SessionVo;
import com.dyj.common.domain.DySimpleResult;
import com.dyj.common.interceptor.ClientTokenInterceptor;

/**
 * @author danmo
 * @date 2024-04-17 10:52
 **/
@BaseRequest(baseURL = "${ttDomain}")
public interface AptLoginClient {

    @Post(url = "${code2Session}")
    DySimpleResult<Code2SessionVo> code2Session(@JSONBody Code2SessionQuery query);

    /**
     * 获取手机号（getPhoneNumber组件code换取手机号）
     * @param body 获取手机号（getPhoneNumber组件code换取手机号）请求值
     * @return
     */
    @Post(value = "${getPhoneNumber}", interceptor = ClientTokenInterceptor.class)
    DySimpleResult<String> getPhoneNumber(@JSONBody GetPhoneNumberQuery body);
}
